<template>
  <div class="temperature-analysis">
    <div class="header">
      <el-form :model="searchForm" :inline="true">
        <el-button-group style="margin-right: 0.4rem;">
          <el-button type="primary" @click="imgIndex = 0">电堆温度预警</el-button>
          <el-button type="primary" @click="imgIndex = 1">单体温度分析</el-button>
        </el-button-group>
        <el-form-item label="电站">
          <el-select v-model="searchForm.site" placeholder="请选择电站" class="search-input">
            <el-option label="电站1" value="site1"></el-option>
            <el-option label="电站2" value="site2"></el-option>
            <el-option label="电站3" value="site3"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
    </div>
    <img src="./pic1.png" width="100%" v-if="imgIndex == 0" />
    <img src="./pic2.png" width="100%" v-if="imgIndex == 0" />
    <img src="./pic3.png" width="100%" v-if="imgIndex == 1" />
  </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue';

const imgIndex = ref(0);
// 搜索表单
const searchForm = ref({
  site: ''
});

</script>

<style lang="scss" scoped>
.temperature-analysis {
  :deep(.el-form-item) {
    margin-bottom: 0;

    .el-form-item__label {
      line-height: 0.4rem;
    }
  }

  .header {
    padding: 0.12rem 0.16rem;

    .el-form {
      display: flex;
      align-items: center;
    }

    .search-input {
      width: 2rem;
    }
  }

}
</style>
